using System.Windows.Forms;
using RollManager.Forms.MainPanels;

namespace RollManager.Forms.MenuDialogs
{
    public class MenuDialog : Form
    {
        private AdminActionsPanel m_panel;

        /// <summary>
        /// Parameterless constructor needed for designer.
        /// </summary>
        public MenuDialog() {}

        public MenuDialog( AdminActionsPanel panel )
        {
            m_panel = panel;
        }

        protected void CloseAndAdd( string name, object tag)
        {
            m_panel.AddNode( name, tag );
            Close();
        }

        protected void CloseAndRefresh()
        {
            m_panel.Refresh();
            Close();
        }
    }
}
